#pragma once

#include <maths.h>

class texture
{
public:
	texture(const std::string &name, Bitmap *bmp, const matrix4 &tm, bool has_alpha);
	~texture();

	std::string get_name() const;

	size_t get_width() const;
	size_t get_height() const;
	size_t get_bpp() const;

	size_t get_size() const;
	void *get_data() const;

	matrix4 get_uv_transforms() const;

	bool has_alpha() const;

	void save() const;

private:
	typedef std::vector<DWORD> byte_vec;

	std::string	m_name;

	byte_vec	m_data;

	size_t		m_width;
	size_t		m_height;
	size_t		m_bpp;

	matrix4		m_tm;

	bool		m_has_alpha;
};

inline texture::~texture() { }

inline std::string texture::get_name() const { return m_name; }

inline size_t texture::get_width() const { return m_width; }

inline size_t texture::get_height() const { return m_height; }

inline size_t texture::get_bpp() const { return m_bpp; }

inline size_t texture::get_size() const { return m_data.size(); }

inline void *texture::get_data() const { return (void*) &m_data[0]; }

inline bool texture::has_alpha() const { return m_has_alpha; }

inline matrix4 texture::get_uv_transforms() const { return m_tm; }